#include <stdio.h>

int main(int argc,const char *argv[],const char *envp[])
{
   int i=0,j=0;

   printf("This is a test program that lists the command line arguments, and environment variables present when run\n\n");

   printf("Command line arguments:\n\n");
   while (argv[i]!=0)
   {
     printf("argv[%d]=\"%s\"\n",i,argv[i]);
     i++;
   }

   printf("\n");
   printf("Environment variables:\n\n");

   while (envp[j]!=0)
   {
     printf("envp[%d]=\"%s\"\n",j,envp[j]);
     j++;
   }

   printf("\n");

   return 0;
}
